package com.nbpt;

import android.app.Activity;
import android.database.Cursor;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.nbpt.db.AccountDBHelp;

import org.w3c.dom.Text;


public class testActivity extends Activity {
    private TextView textView7;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        textView7 = findViewById(R.id.textView7);

        String text="";
        AccountDBHelp helper = new AccountDBHelp(testActivity.this,AccountDBHelp.VERSION_1);
        Cursor cursor = helper.select("gender = '女'",null);
        cursor.moveToFirst();

        for (int i=0;i<cursor.getCount();i++){
            text += cursor.getString(1)+"\n";
            cursor.moveToNext();
        }
        textView7.setText(text);
    }
}
